package homework.test4;


public class Test {
    public static void main(String[] args) {
        Person p1 = new Person("30岁","老王");
        Person p2 = new Person("25岁","老李");

        Dog dog = new Dog();
        dog.setColor("黑颜色");
        dog.setAge("2岁");

        Cat cat = new Cat();
        cat.setAge("3岁");
        cat.setColor("灰颜色");

        p1.keepPet(dog,"骨头");
        p2.keepPet(cat,"鱼");
    }
}
